import java.util.Scanner;

public class LoginNum {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 最多3次机会
		String name = "", pass = "";
		int i = 1;
		// boolean f=false;//

		for (; i <= 3; i++) {
			System.out.println("请输入用户和密码：");
			name = sc.next();
			pass = sc.next();
			if (name.equals("jim") && pass.equals("111111")) {
				System.out.println("欢迎进入e-shop购物系统");
				break;
			}

			System.out.println("输入错误，你还有" + (3 - i) + "次机会");
			// if (i == 3)
			// System.out.println("您3次输入均错误！");
		}
		if (i > 3)
			System.out.println("您3次输入均错误！");
	}

}
